package org.gdpu.Service.Impl;

import org.gdpu.Service.PowerGroupService;
import org.gdpu.base.DaoSupport;
import org.gdpu.model.PowerGroup;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by HEWI2 on 2/17/14.
 */

@Service
@Transactional
public class PowerGroupServiceImpl extends DaoSupport<PowerGroup> implements PowerGroupService {

    @Override
    public PowerGroup findByName(String name) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("powerGroup", name);
        return (PowerGroup) this.findSpecialObject(PowerGroup.class, params);
    }
}
